//
//  GCMLXKHTableViewCell.m
//  GeeCityManager
//
//  Created by 聚城科技 on 16/4/15.
//  Copyright © 2016年 聚城科技. All rights reserved.
//

#import "GCMLXKHTableViewCell.h"

@implementation GCMLXKHTableViewCell{

     UIView * _bgView;
     UILabel *_numberLabel;
     UILabel *_contentLabel;
     UILabel *_createTimeLabel;
     UILabel *_contactLabel;
     UILabel *_createNameLabel;

}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createUI];
    }
    return self;
}

-(void)createUI{
    
    _bgView = [[UIImageView alloc]init];
    _bgView.frame =CGRectMake(5, 5,SCREEN_WIDTH - 10, 110);
    _bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:_bgView];
    
    _numberLabel = [[UILabel alloc]init];
    _numberLabel.frame = CGRectMake(30,0,_bgView.bounds.size.width, 30);
    //_titleLabel.font = [UIFont systemFontOfSize:15];
    //    _titleLabel.textColor = [UIColor lightGrayColor];
    _numberLabel.textAlignment = NSTextAlignmentLeft;
    [_bgView addSubview:_numberLabel];
    
    _createTimeLabel = [[UILabel alloc]init];
    _createTimeLabel.frame = CGRectMake(20 ,30 , _bgView.bounds.size.width - 40, 20);
    _createTimeLabel.font = [UIFont systemFontOfSize:14];
    _createTimeLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    _createTimeLabel.textAlignment = NSTextAlignmentLeft;
    [_bgView addSubview:_createTimeLabel];
    
    _createNameLabel = [[UILabel alloc]init];
    _createNameLabel.frame = CGRectMake(20,50, _bgView.bounds.size.width - 40,20 );
    _createNameLabel.font = [UIFont systemFontOfSize:14];
    _createNameLabel.textAlignment = NSTextAlignmentLeft;
    _createNameLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_createNameLabel];
    
    _contentLabel= [[UILabel alloc]init];
    _contentLabel.frame = CGRectMake(20,70, _bgView.bounds.size.width - 40,20 );
    _contentLabel.font = [UIFont systemFontOfSize:14];
    _contentLabel.textAlignment = NSTextAlignmentLeft;
    _contentLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_contentLabel];
    
    _contactLabel= [[UILabel alloc]init];
    _contactLabel.frame = CGRectMake(20, 90, _bgView.bounds.size.width - 40,20 );
    _contactLabel.font = [UIFont systemFontOfSize:14];
    _contactLabel.textAlignment = NSTextAlignmentLeft;
    _contactLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
    [_bgView addSubview:_contactLabel];
    
}

-(void)setListModel:(GCMLXKHModel *)listMode{
    
    _listModel = listMode;
    _numberLabel.text = [NSString stringWithFormat:@"[%@]",_listModel.number];
    _contentLabel.text = [NSString stringWithFormat:@"沟通内容:%@",_listModel.content];
    _createTimeLabel.text = [NSString stringWithFormat:@"联系时间:%@",_listModel.createTime];
    _contactLabel.text = [NSString stringWithFormat:@"联系人:%@",_listModel.contact];
    _createNameLabel.text = [NSString stringWithFormat:@"登记人: %@",_listModel.createName];
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
